Hi all, i search for a method to find the linkset from a link - i have a link and want to know if the link is in a linkset or not... Maybe you know you can make links between module without a linkset (not clean) ... This is my code:
Project p = current
Object o
Link outL
Link inL
Linkset ls
Module m
Item it
int i = 1
string cbIn = "" //Created By String (In/Out)
string cbOut = ""
string sIn = "" //Source String (In/Out)
string sOut = ""
string tIn = "" //Target String (In/Out)
string tOut = ""
for it in p do
{
if(type(it) == "Formal")
{
m = read(fullName(it), false)
//print fullName(m) "\n"
for o in m do
{
//print i "\n"
i++
/*if(null linkset(o))
{
halt
}
else
{
//ls = linkset(o)
} */
for outL in o -> "*" do //Outgoing Links
{
print "OUT\t"
//cbOut = outL."Created By"
//print cbOut "\n"
sOut = source(outL)
tOut = target(outL)
print sOut " -> " tOut "\n"
}
for inL in o <- "*" do //Incoming Links
{
print "IN\n"
sIn = source(inL)
tIn = target(inL)
print sIn " -> " tIn "\n"
}
}
i = 1
close(m)
}
}
meinhana - Tue Aug 09 04:44:17 EDT 2016 |
Re: Find Linkset Browsing through the perms list, I did not find a direct function for getting a linkset from a link. I think that the perm "Module module (Link)" gives you the link module (I don't have DOORS installed at the moment and cannot check this). If such a module exists, I think you can assume that a linkset exists. If not, you could perhaps iterate over all objects of the link module, get the linkset from these objects (perm "Linkset linkset (Object)") and from this, get the target module ("ModName_ getTargetModule (Linkset)"). But there's no function getSourceModule, otherwise you could have checked whether a linkset exists for the current source and target module of the link -- hm, perhaps I misunderstood a concept here.. |